/*
 * Copyright 2006-2008 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package net.martinimix.dao;

import java.util.Map;

/**
 * Provides a template for executing a chain of Blue Martini business actions.
 * 
 * @author Scott Rossillo
 *
 */
public interface BusinessActionChain {
	
	/**
	 * Executes a chain of business actions.
	 * 
	 *  @param actions an array of <code>String</code>s containing the names of
	 * the <code>BusinessAction</code>s to execute
	 * 
	 * @param input a <code>Map</code> containing the initial parameters
	 * for this execution chain 
	 * 
	 * @param mapper a <code>BusinessActionResponseMapper</code> to handle the mappings
	 * of the final response from the chain
	 * 
	 * @return a <code>Map</code> containing the results produced by the given
	 * <code>mapper</code>
	 */
	public Map executeChain(String actions[], Map input, BusinessActionResponseMapper mapper, boolean wrapFormData);
	
}
